package com.bambooshoot.domain.bo;

import com.bambooshoot.common.core.domain.BaseEntity;
import com.bambooshoot.common.validate.AddGroup;
import com.bambooshoot.common.validate.EditGroup;
import com.bambooshoot.domain.BizTravelDetails;
import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 旅游明细业务对象 biz_travel_details
 *
 * @author mxc
 * @date 2024-07-10
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = BizTravelDetails.class, reverseConvertGenerate = false)
public class BizTravelDetailsBo extends BaseEntity {

    /**
     * 主键
     */
    @NotNull(message = "主键不能为空", groups = {EditGroup.class})
    private Long id;

    /**
     * 旅游表ID
     */
    @NotNull(message = "请选择旅游项目", groups = {AddGroup.class, EditGroup.class})
    private Long travelId;

    /**
     * 旅游名称
     */
    private String travelName;

    /**
     * 时间
     */
    @NotNull(message = "时间不能为空", groups = {AddGroup.class, EditGroup.class})
//    @DateTimeFormat(pattern = "yyyy-MM-dd")
//    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
    private Date travelDate;

    /**
     * 项目类型
     */
    @NotNull(message = "项目类型不能为空", groups = {AddGroup.class, EditGroup.class})
    private Integer itemType;

    /**
     * 项目明细
     */
    private String itemInfo;

    /**
     * 花费金额(元)
     */
    @NotNull(message = "花费金额(元)不能为空", groups = {AddGroup.class, EditGroup.class})
    private BigDecimal amount;


}
